package model

import (
	"gorm.io/gorm"
	"time"
)

type Commons struct {
	Id        uint64         `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	Text      string         `gorm:"column:text;type:varchar(255);comment:文本;not null;" json:"text"`   // 文本
	Image     string         `gorm:"column:image;type:varchar(255);comment:图片;not null;" json:"image"` // 图片
	Video     string         `gorm:"column:video;type:varchar(255);comment:视频;not null;" json:"video"` // 视频
	Like      uint32         `gorm:"column:like;type:int UNSIGNED;comment:点赞数;not null;" json:"like"`  // 点赞数
}
